3.1.43 \(\int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx\) [43]

3.1.43.1 Optimal result
3.1.43.2 Mathematica [A] (verified)
3.1.43.3 Rubi [A] (verified)
3.1.43.4 Maple [A] (warning: unable to verify)
3.1.43.5 Fricas [A] (verification not implemented)
3.1.43.6 Sympy [F]
3.1.43.7 Maxima [F]
3.1.43.8 Giac [F]
3.1.43.9 Mupad [F(-1)]

3.1.43.1 Optimal result

Integrand size = 28, antiderivative size = 140 \[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx=\frac {2 \sqrt {a} c^3 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a c^3 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^2 c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac {2 a^3 c^3 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}} \]

output
2*c^3*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))*a^(1/2)/f-2*a*c^3* 
tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/2)+2/3*a^2*c^3*tan(f*x+e)^3/f/(a+a*sec(f* 
x+e))^(3/2)-2/5*a^3*c^3*tan(f*x+e)^5/f/(a+a*sec(f*x+e))^(5/2)
 
3.1.43.2 Mathematica [A] (verified)

Time = 1.37 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.80 \[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx=\frac {2 a c^3 \left (15 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {c}}\right )+\sqrt {c-c \sec (e+f x)} \left (-23+11 \sec (e+f x)-3 \sec ^2(e+f x)\right )\right ) \tan (e+f x)}{15 f \sqrt {a (1+\sec (e+f x))} \sqrt {c-c \sec (e+f x)}} \]

input
Integrate[Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])^3,x]
 
output
(2*a*c^3*(15*Sqrt[c]*ArcTanh[Sqrt[c - c*Sec[e + f*x]]/Sqrt[c]] + Sqrt[c - 
c*Sec[e + f*x]]*(-23 + 11*Sec[e + f*x] - 3*Sec[e + f*x]^2))*Tan[e + f*x])/ 
(15*f*Sqrt[a*(1 + Sec[e + f*x])]*Sqrt[c - c*Sec[e + f*x]])
 
3.1.43.3 Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.91, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 4392, 3042, 4375, 254, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sqrt {a \sec (e+f x)+a} (c-c \sec (e+f x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sqrt {a \csc \left (e+f x+\frac {\pi }{2}\right )+a} \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3dx\)

\(\Big \downarrow \) 4392

\(\displaystyle -a^3 c^3 \int \frac {\tan ^6(e+f x)}{(\sec (e+f x) a+a)^{5/2}}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle -a^3 c^3 \int \frac {\cot \left (e+f x+\frac {\pi }{2}\right )^6}{\left (\csc \left (e+f x+\frac {\pi }{2}\right ) a+a\right )^{5/2}}dx\)

\(\Big \downarrow \) 4375

\(\displaystyle \frac {2 a^4 c^3 \int \frac {\tan ^6(e+f x)}{(\sec (e+f x) a+a)^3 \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}\)

\(\Big \downarrow \) 254

\(\displaystyle \frac {2 a^4 c^3 \int \left (\frac {\tan ^4(e+f x)}{a (\sec (e+f x) a+a)^2}-\frac {\tan ^2(e+f x)}{a^2 (\sec (e+f x) a+a)}-\frac {1}{a^3 \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right )}+\frac {1}{a^3}\right )d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 a^4 c^3 \left (\frac {\arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{a^{7/2}}-\frac {\tan (e+f x)}{a^3 \sqrt {a \sec (e+f x)+a}}+\frac {\tan ^3(e+f x)}{3 a^2 (a \sec (e+f x)+a)^{3/2}}-\frac {\tan ^5(e+f x)}{5 a (a \sec (e+f x)+a)^{5/2}}\right )}{f}\)

input
Int[Sqrt[a + a*Sec[e + f*x]]*(c - c*Sec[e + f*x])^3,x]
 
output
(2*a^4*c^3*(ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]]/a^(7/2 
) - Tan[e + f*x]/(a^3*Sqrt[a + a*Sec[e + f*x]]) + Tan[e + f*x]^3/(3*a^2*(a 
 + a*Sec[e + f*x])^(3/2)) - Tan[e + f*x]^5/(5*a*(a + a*Sec[e + f*x])^(5/2) 
)))/f
 

3.1.43.3.1 Defintions of rubi rules used

rule 254
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[x^m, 
 a + b*x^2, x], x] /; FreeQ[{a, b}, x] && IGtQ[m, 3]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4375
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d)   Subst[Int[x^m*((2 + a*x^2 
)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] 
]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I 
ntegerQ[n - 1/2]
 

rule 4392
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( 
d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m   Int[Cot[e + f*x]^(2*m)*( 
c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E 
qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !( 
IntegerQ[n] && GtQ[m - n, 0])
 
3.1.43.4 Maple [A] (warning: unable to verify)

Time = 6.16 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.51

method result size
default \(\frac {c^{3} \left (15 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}\right ) \left (\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1\right )^{\frac {5}{2}}-74 \left (1-\cos \left (f x +e \right )\right )^{5} \csc \left (f x +e \right )^{5}+80 \left (1-\cos \left (f x +e \right )\right )^{3} \csc \left (f x +e \right )^{3}-30 \csc \left (f x +e \right )+30 \cot \left (f x +e \right )\right ) \sqrt {-\frac {2 a}{\left (1-\cos \left (f x +e \right )\right )^{2} \csc \left (f x +e \right )^{2}-1}}}{15 f \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )-1\right )^{2} \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )^{2}}\) \(211\)
parts \(\frac {2 c^{3} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right )}{f}+\frac {6 c^{3} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (\cot \left (f x +e \right )-\csc \left (f x +e \right )\right )}{f}+\frac {2 c^{3} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (2 \sin \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f \left (\cos \left (f x +e \right )+1\right )}-\frac {2 c^{3} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (8 \sin \left (f x +e \right )+4 \tan \left (f x +e \right )+3 \sec \left (f x +e \right ) \tan \left (f x +e \right )\right )}{15 f \left (\cos \left (f x +e \right )+1\right )}\) \(221\)

input
int((c-c*sec(f*x+e))^3*(a+a*sec(f*x+e))^(1/2),x,method=_RETURNVERBOSE)
 
output
1/15*c^3/f*(15*2^(1/2)*arctanh(2^(1/2)/((1-cos(f*x+e))^2*csc(f*x+e)^2-1)^( 
1/2)*(-cot(f*x+e)+csc(f*x+e)))*((1-cos(f*x+e))^2*csc(f*x+e)^2-1)^(5/2)-74* 
(1-cos(f*x+e))^5*csc(f*x+e)^5+80*(1-cos(f*x+e))^3*csc(f*x+e)^3-30*csc(f*x+ 
e)+30*cot(f*x+e))*(-2*a/((1-cos(f*x+e))^2*csc(f*x+e)^2-1))^(1/2)/(-cot(f*x 
+e)+csc(f*x+e)-1)^2/(-cot(f*x+e)+csc(f*x+e)+1)^2
 
3.1.43.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 347, normalized size of antiderivative = 2.48 \[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx=\left [\frac {15 \, {\left (c^{3} \cos \left (f x + e\right )^{3} + c^{3} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (23 \, c^{3} \cos \left (f x + e\right )^{2} - 11 \, c^{3} \cos \left (f x + e\right ) + 3 \, c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{15 \, {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2}\right )}}, -\frac {2 \, {\left (15 \, {\left (c^{3} \cos \left (f x + e\right )^{3} + c^{3} \cos \left (f x + e\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (23 \, c^{3} \cos \left (f x + e\right )^{2} - 11 \, c^{3} \cos \left (f x + e\right ) + 3 \, c^{3}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{15 \, {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2}\right )}}\right ] \]

input
integrate((c-c*sec(f*x+e))^3*(a+a*sec(f*x+e))^(1/2),x, algorithm="fricas")
 
output
[1/15*(15*(c^3*cos(f*x + e)^3 + c^3*cos(f*x + e)^2)*sqrt(-a)*log((2*a*cos( 
f*x + e)^2 - 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*cos(f*x + 
e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 2*(23*c^3*cos( 
f*x + e)^2 - 11*c^3*cos(f*x + e) + 3*c^3)*sqrt((a*cos(f*x + e) + a)/cos(f* 
x + e))*sin(f*x + e))/(f*cos(f*x + e)^3 + f*cos(f*x + e)^2), -2/15*(15*(c^ 
3*cos(f*x + e)^3 + c^3*cos(f*x + e)^2)*sqrt(a)*arctan(sqrt((a*cos(f*x + e) 
 + a)/cos(f*x + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) + (23*c^3*cos(f*x 
 + e)^2 - 11*c^3*cos(f*x + e) + 3*c^3)*sqrt((a*cos(f*x + e) + a)/cos(f*x + 
 e))*sin(f*x + e))/(f*cos(f*x + e)^3 + f*cos(f*x + e)^2)]
 
3.1.43.6 Sympy [F]

\[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx=- c^{3} \left (\int 3 \sqrt {a \sec {\left (e + f x \right )} + a} \sec {\left (e + f x \right )}\, dx + \int \left (- 3 \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\right )\, dx + \int \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{3}{\left (e + f x \right )}\, dx + \int \left (- \sqrt {a \sec {\left (e + f x \right )} + a}\right )\, dx\right ) \]

input
integrate((c-c*sec(f*x+e))**3*(a+a*sec(f*x+e))**(1/2),x)
 
output
-c**3*(Integral(3*sqrt(a*sec(e + f*x) + a)*sec(e + f*x), x) + Integral(-3* 
sqrt(a*sec(e + f*x) + a)*sec(e + f*x)**2, x) + Integral(sqrt(a*sec(e + f*x 
) + a)*sec(e + f*x)**3, x) + Integral(-sqrt(a*sec(e + f*x) + a), x))
 
3.1.43.7 Maxima [F]

\[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx=\int { -\sqrt {a \sec \left (f x + e\right ) + a} {\left (c \sec \left (f x + e\right ) - c\right )}^{3} \,d x } \]

input
integrate((c-c*sec(f*x+e))^3*(a+a*sec(f*x+e))^(1/2),x, algorithm="maxima")
 
output
-1/30*(15*((c^3*cos(2*f*x + 2*e)^2 + c^3*sin(2*f*x + 2*e)^2 + 2*c^3*cos(2* 
f*x + 2*e) + c^3)*arctan2((cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos 
(2*f*x + 2*e) + 1)^(1/4)*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e 
) + 1)), (cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1 
)^(1/4)*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) + 1) - (c 
^3*cos(2*f*x + 2*e)^2 + c^3*sin(2*f*x + 2*e)^2 + 2*c^3*cos(2*f*x + 2*e) + 
c^3)*arctan2((cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) 
 + 1)^(1/4)*sin(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)), (cos 
(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1)^(1/4)*cos(1 
/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) - 1) - 2*(c^3*f*cos(2* 
f*x + 2*e)^2 + c^3*f*sin(2*f*x + 2*e)^2 + 2*c^3*f*cos(2*f*x + 2*e) + c^3*f 
)*integrate((((cos(8*f*x + 8*e)*cos(2*f*x + 2*e) + 3*cos(6*f*x + 6*e)*cos( 
2*f*x + 2*e) + 3*cos(4*f*x + 4*e)*cos(2*f*x + 2*e) + cos(2*f*x + 2*e)^2 + 
sin(8*f*x + 8*e)*sin(2*f*x + 2*e) + 3*sin(6*f*x + 6*e)*sin(2*f*x + 2*e) + 
3*sin(4*f*x + 4*e)*sin(2*f*x + 2*e) + sin(2*f*x + 2*e)^2)*cos(7/2*arctan2( 
sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + (cos(2*f*x + 2*e)*sin(8*f*x + 8*e) 
+ 3*cos(2*f*x + 2*e)*sin(6*f*x + 6*e) + 3*cos(2*f*x + 2*e)*sin(4*f*x + 4*e 
) - cos(8*f*x + 8*e)*sin(2*f*x + 2*e) - 3*cos(6*f*x + 6*e)*sin(2*f*x + 2*e 
) - 3*cos(4*f*x + 4*e)*sin(2*f*x + 2*e))*sin(7/2*arctan2(sin(2*f*x + 2*e), 
 cos(2*f*x + 2*e))))*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e)...
 
3.1.43.8 Giac [F]

\[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx=\int { -\sqrt {a \sec \left (f x + e\right ) + a} {\left (c \sec \left (f x + e\right ) - c\right )}^{3} \,d x } \]

input
integrate((c-c*sec(f*x+e))^3*(a+a*sec(f*x+e))^(1/2),x, algorithm="giac")
 
output
sage0*x
 
3.1.43.9 Mupad [F(-1)]

Timed out. \[ \int \sqrt {a+a \sec (e+f x)} (c-c \sec (e+f x))^3 \, dx=\int \sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^3 \,d x \]

input
int((a + a/cos(e + f*x))^(1/2)*(c - c/cos(e + f*x))^3,x)
 
output
int((a + a/cos(e + f*x))^(1/2)*(c - c/cos(e + f*x))^3, x)